home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group01b.txt / 000081_icon-group-sender_Tue Jul 3 13:50:57 2001.msg < prev    next >
Internet Message Format  |  2002-01-03  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id f63KosM05505
  4.     for icon-group-addresses; Tue, 3 Jul 2001 13:50:54 -0700 (MST)
  5. Message-Id: <200107032050.f63KosM05505@baskerville.CS.Arizona.EDU>
  6. Date: Tue, 03 Jul 2001 21:10:32 +1000
  7. From: Kim Bastin <kim@mel.comcen.com.au>
  8. X-Accept-Language: en,pl,cs
  9. X-Newsgroups: comp.lang.icon
  10. Subject: Re: Why is this an invalid expression????
  11. To: icon-group@cs.arizona.edu
  12. Errors-To: icon-group-errors@cs.arizona.edu
  13. Status: RO
  14. Content-Length: 1064
  15.  
  16. Maria Koutsikou wrote:
  17. > I was typing out the following procedure, to call in the main procedure,
  18. > but when I compiled it, I  got an error message saying : "end" : invalid
  19. > expression (indicating the line where the following procedure ends).
  20. > Since when is an "end" at the end of a procedure an invalid expression?
  21. > Can anyone tell me what I'm doing wrong?
  22. > procedure ivs(j, k, m)
  23. >         numbers := [1, 2, 3, 4, 5, -3, -15]
  24. >         lista := []
  25. >         listb := []
  26. >         listc := []
  27. >         listd := []
  28. >         inv := []
  29. >         n := (*numbers)
  30. >         i := 1
  31. >                 every  i := 1 to j-1 do {
  32. >                         temp := write(numbers[i])
  33. >                         put(lista,temp)
  34. >                         i +:= 1
  35. >                         every write(!lista)
  36. >                 {
  37.                   ^
  38. The problem is here. You meant to type "}". The usual cause of an error
  39. with "end" is unbalanced brackets.
  40.  
  41. (I haven't inspected the rest of the code, so I don't know if there are any
  42. other problems.)
  43.  
  44. Kim Bastin
  45.